﻿using System.Collections.Generic;
using System.ServiceModel;
using Model.Entity;

namespace Ones.Wcf.Editorial
{
    [ServiceContract]
    public interface IServiceNewsManagement
    {
        #region News
        
        #region DMM
               
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        bool ComposeNews(News news, NewsVersion newsversions);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        bool UpdateNews(News news, NewsVersion newversions);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        bool DeleteNews(int newsId);

        [OperationContract]
        bool RemoveNews(int newsId);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        bool ReviseNews(string type, News n, NewsVersion nv);



        #endregion
        
        #region DQM
        
        [OperationContract]
        List<viewNews> getAllFilterNews(bool availableNews);

        [OperationContract]
        News RetrieveNewsByID(int newsId);

        [OperationContract]
        List<News> RetrieveNewsByTitle(string newsTitle);

        [OperationContract]
        List<News> RetrieveNewsByCategoryID(string catId);


        [OperationContract]
        List<News> RetrieveNewsByEmployeeID(string empId);



        #endregion

        #endregion
    }
}